<html>
<head><meta charset="utf-8"><title>Integration in custom editor (cpp) · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html">Integration in custom editor (cpp)</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="187735154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187735154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Skytrias <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187735154">(Feb 08 2020 at 23:11)</a>:</h4>
<p>Hey, fairly new here, wanted to know if there are any guides on how to set up rust-analyzer in non supported editors? I got rs_lsp_server.exe running, now i would have to make the client side integration in my custom editor work. problem is its c/cpp and documentation on lsp seems rather sparse.</p>



<a name="187735479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187735479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Skytrias <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187735479">(Feb 08 2020 at 23:21)</a>:</h4>
<p>i could probably call from c/cpp to a rust build dll and load the rust-analyzer example</p>



<a name="187757548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187757548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187757548">(Feb 09 2020 at 12:39)</a>:</h4>
<p>90% features of rust-analyzer is vanilla LSP, so perhaps a better question to ask is "how do I get LSP support in my editor?".</p>
<p>The list of current implementations is here: <a href="https://microsoft.github.io/language-server-protocol/implementors/sdks/" target="_blank" title="https://microsoft.github.io/language-server-protocol/implementors/sdks/">https://microsoft.github.io/language-server-protocol/implementors/sdks/</a></p>
<p>If you editor is missing, than implementing LSP using one of <a href="https://microsoft.github.io/language-server-protocol/implementors/sdks/" target="_blank" title="https://microsoft.github.io/language-server-protocol/implementors/sdks/">existing libraries</a> would be the first step.</p>



<a name="187758591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187758591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Skytrias <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187758591">(Feb 09 2020 at 13:16)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> both links link to the same page if that was intended. RustLSP seems outdated, as the owner said in <a href="https://github.com/rust-lang/rls/pull/96#issuecomment-288348542" target="_blank" title="https://github.com/rust-lang/rls/pull/96#issuecomment-288348542">https://github.com/rust-lang/rls/pull/96#issuecomment-288348542</a>. The cpp implementor doesnt have a lot of documentation <a href="https://github.com/kuafuwang/LspCpp" target="_blank" title="https://github.com/kuafuwang/LspCpp">https://github.com/kuafuwang/LspCpp</a>. quite sad</p>



<a name="187758602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187758602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Skytrias <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187758602">(Feb 09 2020 at 13:18)</a>:</h4>
<p><a href="https://github.com/otreblan/libclsp" target="_blank" title="https://github.com/otreblan/libclsp">https://github.com/otreblan/libclsp</a> seems to be missing a bit of stuff.<br>
im wondering if i could use the rustlsp one and interop between cpp and the rust lib</p>



<a name="187758663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187758663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187758663">(Feb 09 2020 at 13:19)</a>:</h4>
<p>right, the first one is supposed to be <a href="https://microsoft.github.io/language-server-protocol/implementors/tools/" target="_blank" title="https://microsoft.github.io/language-server-protocol/implementors/tools/">https://microsoft.github.io/language-server-protocol/implementors/tools/</a></p>



<a name="187758718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187758718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187758718">(Feb 09 2020 at 13:20)</a>:</h4>
<p>My gut feeling that trying to use rust-lsp from cpp would create more problems that it would solve.</p>
<p>The base protocol is not that complicated, coding it by hand might be easier than depending on a dependecy</p>



<a name="187766873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Integration%20in%20custom%20editor%20%28cpp%29/near/187766873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> std::Veetaha <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Integration.20in.20custom.20editor.20(cpp).html#187766873">(Feb 09 2020 at 17:52)</a>:</h4>
<p>(deleted)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>